<?php

class Application_Form_User extends Zend_Form
{

    public function init()
    {
        $this->setName('user');
        
        $id = new Zend_Form_Element_Hidden('id');
        $id->addFilter('Int');
        
        $username = new Zend_Form_Element_Text('username');
        $username->setLabel($this->getView()->translate('Name'))
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');
        
        $email = new Zend_Form_Element_Text('email');
        $email->setLabel($this->getView()->translate('Email'))
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');
        
        $password = new Zend_Form_Element_Password('password');
        $password->setLabel($this->getView()->translate('Password'))
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');
        
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');
        
        $this->addElements(array($id, $username, $email, $password, $submit));
    }



}

